package com.xiuxia.usercenterbackend.common.exception;

import com.xiuxia.usercenterbackend.common.ResponseCode;
import lombok.Getter;

/**
 * @ClassName BusnessException
 * @Author CHENBO
 * @Date 2024/12/17 10:17
 */
@Getter
public class BusinessException extends RuntimeException {
    private final ResponseCode responseCode;

    public BusinessException(ResponseCode responseCode) {
        super(responseCode.getMessage());
        this.responseCode = responseCode;
    }
    public BusinessException(String customMessage, ResponseCode responseCode) {
        super(customMessage);
        this.responseCode = responseCode;
    }

}
